//
//  KLMessageTableViewCell.m
//  KunLun
//
//  Created by Mac on 2017/11/28.
//  Copyright © 2017年 stoneobs@icloud.com. All rights reserved.
//

#import "KLMessageTableViewCell.h"
@interface KLMessageTableViewCell()
@property(nonatomic, strong) STLabel                     *timeLable;
@property(nonatomic, strong) STLabel                     *typeLable;
@property(nonatomic, strong) STLabel                     *desLable;
@property(nonatomic, strong) UIView                     *whiteView;

@end
@implementation KLMessageTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self configSubView];
    }
    return self;
}
+ (CGFloat)cellHeight{
    return 150;
}
#pragma mark --subView
- (void)configSubView{
    self.backgroundColor = KL_backgroundColor;
    self.whiteView = [[UIView alloc] initWithFrame:CGRectMake(10, 10, UIScreenWidth - 20, [KLMessageTableViewCell cellHeight] - 20)];
    self.whiteView.backgroundColor = [UIColor whiteColor];
    self.whiteView.clipsToBounds = YES;
    self.whiteView.layer.cornerRadius = 8;
    [self addSubview:self.whiteView];
    
    self.timeLable = [[STLabel alloc] initWithFrame:CGRectMake(10, 10, 200, 16)
                                               text:@"2017年11月28日14:59:46"
                                          textColor:KL_secendTextColor
                                               font:15
                                        isSizetoFit:NO
                                      textAlignment:NSTextAlignmentCenter];
    self.timeLable.centerX = self.whiteView.width / 2;
    [self.whiteView addSubview:self.timeLable];
    
    
    self.typeLable = [[STLabel alloc] initWithFrame:CGRectMake(10, self.timeLable.bottom + 10, 200, 16)
                                               text:@"系统消息"
                                          textColor:KL_firstTextColor
                                               font:15
                                        isSizetoFit:NO
                                      textAlignment:NSTextAlignmentLeft];
    
    [self.whiteView addSubview:self.typeLable];
    
    UIView * line = [[UIView alloc] initWithFrame:CGRectMake(0, self.typeLable.bottom  +10, self.whiteView.width, 0.5)];
    line.backgroundColor =KL_lineColor;
    [_whiteView addSubview:line];
    
    
    self.desLable = [[STLabel alloc] initWithFrame:CGRectMake(10, line.bottom  +10, _whiteView.width - 20, 60)
                                              text:@"水电费三大范德萨范德萨发斯蒂芬斯蒂芬递四方速递防守打法是的范德萨水电费试试东方闪电"
                                         textColor:KL_secendTextColor
                                              font:14
                                       isSizetoFit:NO
                                     textAlignment:NSTextAlignmentLeft];
    self.desLable.numberOfLines = 0;
    [_whiteView addSubview:self.desLable];
    
}

@end
